{% extends 'ProjResManBundle::layout.html.twig' %}

{% block header_menu_login_href %}{% if template_content.auth.isAuth == false %}{{ template_content.header.menu.login }}{% else %}{{ template_content.header.menu.logout }}{% endif %}{% endblock %}
{% block header_menu_login_text %}{% if template_content.auth.isAuth == false %}{{ template_content.header.text.login }}{% else %}{{ template_content.header.text.logout }}{% endif %}{% endblock %}
{% block header_menu_login_user %}{% if template_content.auth.isAuth == true %}{{ template_content.auth.user }}{% endif %}{% endblock %}
{% block header_menu_login_message %}{% if template_content.auth.isAuth == true %}User:{% endif %}{% endblock %}
{% block content %}
<div id="page_content">
    <div id="submenu">
        <div id="submenu_float1">
            <div id="submenu_float2">
                <ul>
                    {% block submenu -%}
                    {% for item in template_content.content.submenu %}
                    <ul class="submenu_option">
                        <a href={{ item.href }}>
                        <li class="submenu_header">{{ item.title }}</li>
                        <li class="submenu_details">{{ item.title_desc }}</li>
                    </a>
                    </ul>
                    {% endfor %}
                    {% endblock %}
                </ul>
            </div>
        </div>
    </div>
    <div id="container">
        <table class="table table-hover">
            <thead>
                <tr>
                    <th>First Name</th>
                    <th>Last Name</th>
                    <th>Email</th>
                    <th>Address</th>
                    <th>Department</th>
                    <th>Function</th>
                    
                </tr>
            </thead>
            <tbody>
                {% for people in people_list %}
                    <tr>
                        <td>{{ people.firstname }}</td>
                        <td>{{ people.lastname }}</td>
                        <td>{{ people.email }}</td>
                        <td>{{ people.address }}</td>
                        <td>{{ people.department  }}</td>
                        <td>{{ people.function}}</td>
                        
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
    <div>
        <a href="{{ path('admin_people_add') }}" style="text-decoration: none;">
            <button type="submit" class="btn btn-info" style="margin-left:auto;margin-right:auto;display:block;margin-bottom:20px;">
                Adauga resurse umane
            </button>
        </a>
    </div>
</div>
{% endblock %}